import execa from "execa"

export async function dts(packageName, filename) {
  await execa("api-extractor", [
      "run", "--local",
      "--config", `./packages/${packageName}/${filename}.api-extractor.json`,
    ],
    {
      stdio: "inherit",
    })
}

await dts("shared", "data")
await dts("shared", "ownership")
await dts("shared", "position")
await dts("client", "index")
await dts("client", "axios")
await dts("client", "case")
await dts("client", "message")
await dts("catalog", "index")
await dts("shipping", "index")
await dts("keystone", "identity")
await dts("keystone", "security")
await dts("marketing", "coupon")
await dts("order", "index")
await dts("store", "index")
await dts("store", "staff")
